<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexIdxEntityPlanTable extends AbstractMigration
{
    public function up()
    {
        $this->table('plan')
            ->addIndex(['entity_id'], ['type' => 'normal', 'name' => 'idx_plan_entity_id'])
            ->save();

    }

    public function down()
    {
        $this->table('plan')->removeIndexByName('idx_plan_entity_id')->save();
    }
}
